package com.hdy.orderforthree.mvp;

import com.hdy.net.order.NetCallback;
import com.hdy.orderforthree.pos.ConcretePosFactory;

public class FoodModel implements IFoodContract.Model {

    @Override
    public void getFoodData(NetCallback callback) {
        /*Food food = new Food();
        List<CategoryBean> beans = new ArrayList<>();
        Map<String, List> maps = new HashMap<>();
        food.setFoodCategoryList(beans);
        food.setFoodMap(maps);

        for(int i = 0; i < 20; i++) {
            CategoryBean bean = new CategoryBean();
            bean.setCode("100" + i);
            bean.setName("类别"+i);
            food.getFoodCategoryList().add(bean);

            List<DishBean> foodbeans = new ArrayList<>();
            for(int j = 0; j < 15; j++) {
                DishBean foodbean = new DishBean();
                foodbean.setCode("" + j);
                foodbean.setName("菜品" + i + "" + j);
                foodbeans.add(foodbean);
            }
            food.getFoodMap().put(bean.getCode(), foodbeans);
        }
        callback.onNext(food);*/

        //RetrofitTest.getIpInfo();

        ConcretePosFactory.getInstance().getPos().getAllMenus(callback);
    }
}
